An oil well typically goes through a “completion” process after it is drilled. Casing is installed in the well bore and cement is poured around the casing. This process stabilizes the well bore and keeps it from collapsing. Part of the completion process involves using a perforating system to perforate the casing and cement so that fluids in the formations can flow through the cement and casing and be brought to the surface. The perforation process is often accomplished with shaped explosive charges in a perforation tool. These perforation charges are often fired by applying power from a battery housed in the perforation to the explosive charges tool upon command from operators on the surface. Multiple safeguards prevent unintended detonation of the explosive charges including pressure sensors, temperature sensors, and time delays, all of which are intended to insure that the perforating tool is at a desired depth before detonation commands from the surface will be accepted and acted upon. Time delays are often measured by battery-powered real-time clocks housed in the perforating tool. It is a challenge to maintain the accuracy of a real-time clock in a hostile environment in which a battery may be temporarily jarred from its seat causing a temporary power failure, real-time clock reset, and processor reset.